package io.kiki.sba.registry.common.model.slot;

import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

@Setter
@Getter
public class FollowerSlotStatus extends BaseSlotStatus implements Serializable {

    private final long lastSyncTaskStartTime;

    @Getter
    private final long lastLeaderSyncTime;

    /**
     * Constructor.
     *
     * @param slotId                the slot id
     * @param slotLeaderEpoch       the slot leader epoch
     * @param server                the server
     * @param lastSyncTaskStartTime the last sync task start time
     * @param lastLeaderSyncTime    the last leader sync time
     */
    public FollowerSlotStatus(int slotId, long slotLeaderEpoch, String server, long lastSyncTaskStartTime, long lastLeaderSyncTime) {
        super(slotId, slotLeaderEpoch, SlotRole.follower, server);
        this.lastSyncTaskStartTime = lastSyncTaskStartTime;
        this.lastLeaderSyncTime = lastLeaderSyncTime;
    }


}
